-
Notifications
You must be signed in to change notification settings - Fork 421
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
make auto the default for layer config #1016
make auto the default for layer config #1016
Conversation
Added maximum precision to the keras options. In |
The |
I added the backend to be passed for the "config_from_*" functions. This works much better in providing all the configuration parameters one can set. |
Based on discussions with other people, we decided not to add a special type propagation fallback value--the model level value is the default. We do support a maximum precision, but there is no flag to not place auto in the configuration. |
Can it be extended in order to be applied to QONNX ingestion as well? |
I think the code in #979 infers the precision from the QONNX model, so that should be covered there. The pytorch parser however will need to be updated to use |
By the way, one thing I am not too happy about is that it seems like the |
Can we even do this? I thought we agreed on the approach of inferring early since the lack of precision will trip up downstream optimizers even more |
I am not sure for the backend-specific optimizers, like the type conversions, but the type-agnostic ones don't need types, or benefit from knowing that they don't have to enforce a certain type somewhere. |
It does for weights/biases and in general for |
Description
This changes config_from_keras in 'name' mode to make the layer precisions to default to 'auto'. (It is generally recommended to pass the backend in that case. The default precision is still provided in the model level and generally is used as the real default when the precision cannot be inferred.
Note: for PTQ, this change could cause the model widths to become huge! Care must be used. Maybe a flag should be provided on whether to use autos or not?
Note: if config_from_keras is used in 'model' or 'type' mode, there is no change.
Type of change
Tests
Should verify the standard tests.
Checklist
pre-commit
on the files I edited or added.